package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Objects;

/*合同详情*/

@Entity
public class Hetongxiangqing {
    private int htxqId;//合同详情id
    private Productt productt;//产品(详情)id
    private Integer htcpMun;//合同产品数量
    private BigDecimal htcpPrice;//合同产品价格
    private Hetong hetongByHtId;//合同对象（合同id）
    private BigDecimal htcpXiaoji;//合同产品小计


    @Basic
    @Column(name = "htcp_xiaoji", nullable = true, precision = 0)
    public BigDecimal getHtcpXiaoji() {
        return htcpXiaoji;
    }

    public void setHtcpXiaoji(BigDecimal htcpXiaoji) {
        this.htcpXiaoji = htcpXiaoji;
    }

    @Id
    @Column(name = "htxq_id", nullable = false, precision = 0)
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getHtxqId() {
        return htxqId;
    }

    public void setHtxqId(int htxqId) {
        this.htxqId = htxqId;
    }

    @ManyToOne
    @JoinColumn(name = "productt_id", referencedColumnName = "productt_id")
    public Productt getProductt() {
        return productt;
    }

    public void setProductt(Productt product) {
        this.productt = product;
    }


    @Basic
    @Column(name = "htcp_mun", nullable = true, precision = 0)
    public Integer getHtcpMun() {
        return htcpMun;
    }

    public void setHtcpMun(Integer htcpMun) {
        this.htcpMun = htcpMun;
    }

    @Basic
    @Column(name = "htcp_price", nullable = true, precision = 2)
    public BigDecimal getHtcpPrice() {
        return htcpPrice;
    }

    public void setHtcpPrice(BigDecimal htcpPrice) {
        this.htcpPrice = htcpPrice;
    }


    @ManyToOne
    @JoinColumn(name = "ht_id", referencedColumnName = "ht_id")
    public Hetong getHetongByHtId() {
        return hetongByHtId;
    }

    public void setHetongByHtId(Hetong hetongByHtId) {
        this.hetongByHtId = hetongByHtId;
    }
}
